﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="AutoBatchUnionforPackageProductSNs.aspx.cs" Inherits="ProductRepair_ManageRepair_AutoBatchUnionforPackageProductSNs"
    Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="text-align: center;">
                <br />
                <br />
                <div style="clear: both;">
                    <p style="text-align: center">
                        请扫描产品类型：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:RequiredFieldValidator
                            ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="*"
                            ValidationGroup="VGroup2"></asp:RequiredFieldValidator></p>
                </div>
                <div style="text-align: center; clear: both; height: 339px; width: 50%; border: 1px solid Black;
                    margin: 0 auto;">
                    <div style="height: 100%; width: 70%; float: left;">
                        <br />
                        成品序列号：<asp:TextBox ID="TextBox2" runat="server" Height="22px" Width="124px"></asp:TextBox><asp:RequiredFieldValidator
                            ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" ErrorMessage="*"
                            ValidationGroup="VGroup1"></asp:RequiredFieldValidator><br />
                        <br />
                        <asp:ListBox ID="ListBox1" runat="server" Height="212px" Width="284px" SelectionMode="Multiple">
                        </asp:ListBox>
                        <br />
                        共<asp:Label ID="Label1" runat="server" Text="0" ForeColor="Red"></asp:Label>个产品
                        <br />
                        <br />
                    </div>
                    <div style="height: 100%; width: 30%; float: left;">
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <asp:Button ID="Button1" runat="server" Text="添加" OnClick="Button1_Click" ValidationGroup="VGroup1" />
                        <br />
                        <br />
                        <asp:Button ID="Button2" runat="server" Text="删除" OnClick="Button2_Click" />
                        <br />
                        <br />
                        <asp:Button ID="Button3" runat="server" Text="清空" OnClick="Button3_Click" />
                        <br />
                        <br />
                        <asp:Button ID="Button5" runat="server" OnClick="Button5_Click" Text="粘帖" />
                    </div>
                    <br />
                    <br />
                </div>
                <div style="clear: both;">
                    <p style="text-align: center">
                        &nbsp;<asp:Button ID="Button4" runat="server" Text="批量自动关联" OnClick="Button4_Click"
                            ValidationGroup="VGroup2" />
                        <%--<asp:ConfirmButtonExtender ID="Button4_ConfirmButtonExtender" runat="server" ConfirmText="确认提交这一批次的腔体?"
                            Enabled="True" TargetControlID="Button4">
                        </asp:ConfirmButtonExtender>--%>
                    </p>
                </div>
                <br />
                <input id="myVal" runat="server" type="hidden" />
                <br />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <hr />
    <div style="text-align: center">
        <br />
        查询成品序列号是否已经关联：<br />
        <br />
        <div style="text-align: center; clear: both; height: 272px; width: 50%; border: 1px solid Black;
            margin: 0 auto;">
            <br />
            成品序列号：<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><asp:RequiredFieldValidator
                ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3" ErrorMessage="*"
                ValidationGroup="VGroup3"></asp:RequiredFieldValidator>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Button6" runat="server" Text="查  询" OnClick="Button6_Click" ValidationGroup="VGroup3" />
            <br />
            <br />
            <asp:GridView ID="GridView2" runat="server" BackColor="White" Width="100%" BorderColor="White"
                BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None"
                AutoGenerateColumns="False">
                <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
                <Columns>
                    <asp:BoundField DataField="PackageProductSN" HeaderText="成品序列号" />
                    <asp:HyperLinkField DataNavigateUrlFields="ProductSN" DataNavigateUrlFormatString="~/ViewbyProduct/ViewProductState/ProductSNLifeTime.aspx?ProductSN={0}"
                        DataTextField="ProductSN" HeaderText="腔体序列号" NavigateUrl="~/ViewbyProduct/ViewProductState/ProductSNLifeTime.aspx"
                        Text="ProductSN" />
                    <asp:BoundField DataField="ProductTypeID" HeaderText="产品类型" />
                    <asp:BoundField DataField="UserID" HeaderText="操作员" />
                    <asp:BoundField DataField="UnionTime" HeaderText="关联时间" />
                </Columns>
                <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
            </asp:GridView>
        </div>
        <br />
        <br />
    </div>
    <%--此功能在IE中可用，在Chrome中不可用--%>

    <script type="text/javascript">
        function PasteData() {
            var str = clipboardData.getData('text');
            //document.getElementById("ctl00_ContentPlaceHolder1_myVal").value = str;
            document.getElementById("<%=myVal.ClientID%>").value = str;
        }
    </script>

</asp:Content>
